{#
 This Source Code Form is subject to the terms of the Mozilla Public
 License, v. 2.0. If a copy of the MPL was not distributed with this
 file, You can obtain one at https://mozilla.org/MPL/2.0/.
#}

{% from "macros-protocol.html" import callout with context %}

{% extends "firefox/base/base-protocol.html" %}

{# "noindex" pages should not have the canonical or hreflang tags: bug 1442331 #}
{% block canonical_urls %}<meta name="robots" content="noindex,follow">{% endblock %}

{% block page_title %}{{ ftl('set-as-default-thanks-set-as-default-thanks-for-choosing-firefox') }}{% endblock %}

{% block page_css %}
  {{ css_bundle('protocol-callout')}}
  {{ css_bundle('firefox-default-thanks') }}
{% endblock %}

{% set utms = '?utm_source=mozilla.org-default-thanks&utm_medium=referral&utm_campaign=default-thanks&entrypoint=mozilla.org-default-thanks' %}

{% block content %}
<main>
  <div class="mzp-l-content">
    <div class="mzp-c-notification-bar mzp-t-success hide-from-legacy-ie thanks-state-is-default">
      <p>{{ ftl('set-as-default-thanks-success-your-default-browser') }}</p>
    </div>
  </div>

  {% call callout(
    title=ftl('set-as-default-thanks-set-as-default-thanks-for-choosing-firefox'),
    class='mzp-t-product-firefox mzp-t-hero thanks-hero',
    include_cta=True,
    heading_level=1,
    brand=True,
    brand_product='firefox',
    brand_type='logo',
    brand_size='xl',
  ) %}
    <div class="thanks-state-not-firefox">
      <p class="mzp-c-callout-desc">
        {{ ftl('set-as-default-thanks-looks-like-youre-using-a') }}
      </p>
      {{ download_firefox(alt_copy=ftl('download-button-download-firefox'), download_location='primary cta') }}
    </div>
    <div class="mzp-c-callout-desc thanks-state-not-default-desktop hide-from-legacy-ie" data-testid="firefox-not-default-message">
      <p>{{ ftl('set-as-default-thanks-youre-almost-done-just-change') }}</p>

      <p class="thanks-help-text">
        <a href="https://support.mozilla.org/kb/make-firefox-your-default-browser{{ utms }}">
          {{ ftl('set-as-default-thanks-having-trouble-setting-your') }}
        </a>
      </p>
    </div>
    <p class="mzp-c-callout-desc thanks-state-not-default-android hide-from-legacy-ie">
    {{ ftl('set-as-default-thanks-heres-everything-you-need-android',
           android='https://support.mozilla.org/kb/make-firefox-default-browser-android' ~ utms) }}
    </p>
    <p class="mzp-c-callout-desc thanks-state-not-default-ios hide-from-legacy-ie">
    {{ ftl('set-as-default-thanks-heres-everything-you-need-ios',
           ios='https://support.mozilla.org/en-US/kb/unable-set-firefox-default-browser-ios' ~ utms) }}
    </p>
    <p class="mzp-c-callout-desc thanks-state-is-default hide-from-legacy-ie">
      {{ ftl('set-as-default-thanks-youre-all-set') }}
    </p>
  {% endcall %}

  <aside class="thanks-extra-links">
    <div class="mzp-l-content">
      <section class="thanks-extra-links-item mobile">
        <h2 class="thanks-extra-links-heading">
          {{ ftl('set-as-default-thanks-get-firefox-for-mobile') }}
        </h2>
        <p>{{ ftl('set-as-default-thanks-travel-the-internet-with') }}</p>
        <a href="{{ url('firefox.browsers.mobile.index') }}">{{ ftl('set-as-default-thanks-download-the-app') }}</a>
      </section>

      <section class="thanks-extra-links-item join">
        <h2 class="thanks-extra-links-heading">
          {{ ftl('set-as-default-create-an-account') }}
        </h2>
        <p>{{ ftl('set-as-default-thanks-sign-up-for-a-free-account-v2') }}</p>
        <a href="{{ url('mozorg.account') }}">{{ ftl('set-as-default-thanks-get-an-account') }}</a>
      </section>

      <section class="thanks-extra-links-item help">
        <h2 class="thanks-extra-links-heading">
          {{ ftl('set-as-default-thanks-having-trouble') }}
        </h2>
        <p>
        {{ ftl('set-as-default-thanks-heres-everything-you-need-android-desktop',
               android='https://support.mozilla.org/kb/make-firefox-default-browser-android' ~ utms,
               desktop='https://support.mozilla.org/kb/make-firefox-your-default-browser' ~ utms) }}
        </p>
      </section>
    </div>
  </aside>
</main>
{% endblock %}

{% block js %}
  {{ js_bundle('firefox-default-thanks') }}
{% endblock %}
